import { defHttp } from '/@/utils/http/axios';

enum Api {
  list = '/extension/query',
  info = '/extension/info',
  delete = '/extension/delete',
  save = '/extension/add',
}

/**
 * 列表
 * @param params
 */
export const list = (params) => {
  return defHttp.post({ url: Api.list, params });
};
/**
 * 协议详情
 * @param params
 */
export const infoRequest = (params) => {
  return defHttp.post({ url: Api.info, params });
};
/**
 * 删除
 * @param params
 */
export const deleteRequest = (params) => {
  return defHttp.post({ url: Api.delete, params });
};
/**
 * 保存/启用/停止
 * @param params
 */
export const saveOrUpdate = (params) => {
  return defHttp.post({ url: Api.save, params });
};
